<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
    <th:block th:include="include :: header('修改【请填写功能名称】')" />
    <th:block th:include="include :: datetimepicker-css" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-orders-edit" th:object="${orders}">
            <input name="id" th:field="*{id}" type="hidden">
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">订单编号：</label>
                    <div class="col-sm-8">
                        <input name="orderNo" th:field="*{orderNo}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">父订单号：</label>
                    <div class="col-sm-8">
                        <input name="orderNoParent" th:field="*{orderNoParent}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">订单来源，1：APP，2：web，3：小程序：</label>
                    <div class="col-sm-8">
                        <input name="orderSource" th:field="*{orderSource}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">订单来源名称：</label>
                    <div class="col-sm-8">
                        <input name="orderSourceName" th:field="*{orderSourceName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">订单状态名称：</label>
                    <div class="col-sm-8">
                        <input name="orderStatusName" th:field="*{orderStatusName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">支付状态名称：</label>
                    <div class="col-sm-8">
                        <input name="payStatusName" th:field="*{payStatusName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">冻结前状态名称：</label>
                    <div class="col-sm-8">
                        <input name="preFrozenStatusName" th:field="*{preFrozenStatusName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">退款状态名称：</label>
                    <div class="col-sm-8">
                        <input name="refundStatusName" th:field="*{refundStatusName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">下单人ID：</label>
                    <div class="col-sm-8">
                        <input name="creatorUserId" th:field="*{creatorUserId}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">下单人名称：</label>
                    <div class="col-sm-8">
                        <input name="createUserName" th:field="*{createUserName}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">出行人数：</label>
                    <div class="col-sm-8">
                        <input name="travelerCount" th:field="*{travelerCount}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">特殊需求：</label>
                    <div class="col-sm-8">
                        <textarea name="specialRequests" class="form-control">[[*{specialRequests}]]</textarea>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">出行日期：</label>
                    <div class="col-sm-8">
                        <div class="input-group date">
                            <input name="serviceDate" th:value="${#dates.format(orders.serviceDate, 'yyyy-MM-dd')}" class="form-control" placeholder="yyyy-MM-dd" type="text" required>
                            <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">成本价格：</label>
                    <div class="col-sm-8">
                        <input name="priceCost" th:field="*{priceCost}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label is-required">销售价格：</label>
                    <div class="col-sm-8">
                        <input name="priceSale" th:field="*{priceSale}" class="form-control" type="text" required>
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">司机ID：</label>
                    <div class="col-sm-8">
                        <input name="driverId" th:field="*{driverId}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">司机名称：</label>
                    <div class="col-sm-8">
                        <input name="driverName" th:field="*{driverName}" class="form-control" type="text">
                    </div>
                </div>
            </div>
            <div class="col-xs-12">
                <div class="form-group">
                    <label class="col-sm-3 control-label">司机手机：</label>
                    <div class="col-sm-8">
                        <input name="driverPhone" th:field="*{driverPhone}" class="form-control" type="text">
                    </div>
                </div>
            </div>
        </form>
    </div>
    <th:block th:include="include :: footer" />
    <th:block th:include="include :: datetimepicker-js" />
    <script th:inline="javascript">
        var prefix = ctx + "system/orders";
        $("#form-orders-edit").validate({
            focusCleanup: true
        });

        function submitHandler() {
            if ($.validate.form()) {
                $.operate.save(prefix + "/edit", $('#form-orders-edit').serialize());
            }
        }

        $("input[name='serviceDate']").datetimepicker({
            format: "yyyy-mm-dd",
            minView: "month",
            autoclose: true
        });
    </script>
</body>
</html>